//------------------------------------------------------------------------------
// <copyright file="Weapon.cpp" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------


#include "pch.h"
#include "Weapon.h"

namespace CppDemo
{
	Weapon::Weapon()
	{
		damage = 0;
		modifier = 0.0;
	}

	Weapon::Weapon(RpcArchive^ archive)
	{
		damage = archive->GetNamedDwordValue(L"damage");
		modifier = archive->GetNamedDoubleValue(L"modifier");
	}

	RpcArchive^ Weapon::ToRpcArchive()
	{
		RpcArchive^ result = ref new RpcArchive();
		result->SetNamedDwordValue(L"damage", damage);
		result->SetNamedDoubleValue(L"modifier", modifier);
		return result;
	}

}